Platform Explorer / Nuxeo Platform 2021.63

Extension point plugin

Documentation

Plugin extension point for the tree manager service.

Enables registration of plugins that will control document filter and sorting.

Example of a plugin registration:

    <treeManagerPlugin name="navigation">
        <excludedFacets>
            <facet name="HiddenInNavigation"/>
        </excludedFacets>
        <includedFacets>
            <facet name="Folderish"/>
        </includedFacets>
        <excludedTypes>
            <type>Section</type>
        </excludedTypes>
        <sortPropertyPath>dc:title</sortPropertyPath>
        <filterClass>org.example.com.MyFilterClass</filterClass>
        <leafFilterClass>org.example.com.MyLeafFilterClass</leafFilterClass>
        <sorterClass>org.example.com.MySorterClass</sorterClass>
    </treeManagerPlugin>

Example of a plugin using a page provider:

    <treeManagerPlugin name="navigation">
        <leafFilterClass>
            org.nuxeo.ecm.webapp.tree.BigFolderLeafFilter
          </leafFilterClass>
        <pageProvider>TREE_CHILDREN</pageProvider>
    </treeManagerPlugin>

  • excludedFacets: list of facets used to filter documents that should not appear in the tree
  • includedFacets: list of facets used to filter documents that should appear in the tree
  • excludedTypes: list of types used to filter documents that should not appear in the tree
  • sortPropertyPath: property path used to sort tree node children when using the default sorter
  • filterClass: the filter class has to implement the org.nuxeo.ecm.core.api.Filter interface. If it implements the org.nuxeo.ecm.webapp.tree.DocumentTreeFilter interface, the above filter properties will be set on it.
  • leafFilterClass: filter that can decide that a document is shown with no children. The leaf filter class has to implement the org.nuxeo.ecm.core.api.Filter interface.
  • sorterClass: the sorter class has to implement the org.nuxeo.ecm.core.api.Sorter interface. If it implements the org.nuxeo.ecm.webapp.tree.DocumentTreeSorter interface, the above sort property will be set on it.
  • queryModel: the page provider (with one free parameter that will be replaced by the tree node id) to use to list the children of a document in the tree. When not defined, a core query using the filterClass and sorterClass is used.
  • queryModel: the query model (with one free parameter) to use to list the children of a document in the tree. When not defined, a core query using the filterClass and sorterClass is used. NOW DEPRECATED, use pageProvider instead.
  • orderableQueryModel: the query model (with one free parameter) to use to list the children of an orderable document in the tree. NOW DEPRECATED, use pageProvider instead.

Contribution Descriptors

  • Class: org.nuxeo.ecm.webapp.tree.TreeManagerPluginDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-platform-publisher-web-2021.63.8.jar /OSGI-INF/nxtreemanager-contrib.xml
    <extension point="plugin" target="org.nuxeo.ecm.platform.treeManager">
    
        <documentation>
          Configuration for the Nuxeo EP tree used in Manage publication tab.
    
          Displays only Folderish objects, not marked as hidden in navigation
        </documentation>
    
        <treeManagerPlugin name="publication">
          <excludedFacets>
            <facet name="HiddenInNavigation"/>
          </excludedFacets>
          <includedFacets>
            <facet name="Folderish"/>
          </includedFacets>
        </treeManagerPlugin>
    
      </extension>
  • nuxeo-platform-webapp-base-2021.63.8.jar /OSGI-INF/nxtreemanager-contrib.xml
    <extension point="plugin" target="org.nuxeo.ecm.platform.treeManager">
    
        <documentation>
          Default configuration for the Nuxeo EP tree.
    
          Displays only Folderish objects, not marked as hidden in navigation, and
          sorts by dc:title property. Folders with the BigFolder facet are shown
          without any children.
        </documentation>
    
        <treeManagerPlugin name="navigation">
          <leafFilterClass>
            org.nuxeo.ecm.webapp.tree.BigFolderLeafFilter
          </leafFilterClass>
          <pageProvider>tree_children</pageProvider>
        </treeManagerPlugin>
    
      </extension>